<extend name="Public/base"/>
<block name="body">
    <link rel="stylesheet" href="/static/backend/css/report.css">
    <link rel="stylesheet" href="/static/backend/plugins/layui/css/modules/layer/default/layer.css"  media="all">
    <div class="page-crumb">
        <div class="ui-ctrl ui-crumb"><span class="ui-crumb-node ui-crumb-node-first ui-crumb-node-last">财务管理</span></div>
    </div>
    <div class="ui-nav-tab">
        <a class="nav-item state-active"  data-pjax>财务报告</a>
    </div>
    <div class="layui-main">
        <div class="report-view">
            <div class="report-general">
                <ul class="general-detail">
                    <li class="general-detail-item general-detail-item-view">
                        <p class="general-detail-item-base">
                            <span class="general-detail-item-data" id="view" >{$data.amount}</span>
                        </p>
                        <p class="general-detail-item-name">总金额</p>
                    </li>

                    <li class="general-detail-item general-detail-item-click">
                        <p class="general-detail-item-base">
                            <span class="general-detail-item-data" id="click" >{$data.total_amount}</span>
                        </p>
                        <p class="general-detail-item-name">消费金额</p>
                    </li>

                    <li class="general-detail-item general-detail-item-click-ratio">
                        <p class="general-detail-item-base">
                            <span class="general-detail-item-data" id="click_rate_sum" >{$data.balance}</span>
                        </p>
                        <p class="general-detail-item-name">剩余金额</p>
                    </li>

                </ul>
            </div>
        </div>
    </div>
    <div class="layui-main">


        <!-- 数据列表 -->
        <table class="layui-table list-content-table" lay-skin="nob">
            <colgroup>
                <col width="50">
                <col width="150">
                <col width="150">
                <col width="150">
                <col width="150">
                <col width="150">
            </colgroup>
            <thead class="list-table-head">
            <tr>
                <th class="ui-table-hcell">
                    <div class="ui-table-hcell-text ui-table-hcell-text-first">
                        <input type="checkbox" class="ui-table-select-all" data-index="">
                    </div>
                </th>
                <th class="ui-table-hcell">
                    <div class="ui-table-hcell-text">投放名称</div>
                </th>
                <th class="ui-table-hcell">
                    <div class="ui-table-hcell-text">消费金额</div>
                </th>
                <th class="ui-table-hcell">
                    <div class="ui-table-hcell-text">订单总金额</div>
                </th>
                <th class="ui-table-hcell">
                    <div class="ui-table-hcell-text">订单总消费金额</div>
                </th>
                <th class="ui-table-hcell">
                    <div class="ui-table-hcell-text">所属订单</div>
                </th>
            </tr>
            </thead>

            <tbody class="list-table-body">
            <foreach name="result" item="data">
                <foreach name="data" item="delivery">
                <tr>
                    <td class="ui-table-cell">
                        <div class="ui-table-cell-text">
                            <input type="checkbox" class="ui-table-multi-select" data-id="{$delivery.id}">
                        </div>
                    </td>
                    <td class="ui-table-cell"><div class="ui-table-cell-text">{$delivery.delivery_name}<span class="table-content-addition">ID: {$delivery.id}</span></div></td>
                    <td class="ui-table-cell"><div class="ui-table-cell-text">{$delivery.use_amount}</div></td>
                    <td class="ui-table-cell"><div class="ui-table-cell-text">{$delivery.amount}</div></td>
                    <td class="ui-table-cell"><div class="ui-table-cell-text">{$delivery.total_amount}</div></td>
                    <td class="ui-table-cell"><div class="ui-table-cell-text">{$delivery.order_name}</div></td>
                </tr>
                </foreach>
            </foreach>
            </tbody>
        </table>
        {$page}
    </div>
    <script src="__BACKEND_STATIC__/js/AdOrder/order.js"></script>
</block>

